import { IsNotEmpty, Length } from 'class-validator';
import { ApiProperty } from '@nestjs/swagger';

export class CreateRestaurantDto {
  @ApiProperty({ description: '餐厅名称', maxLength: 50 })
  @IsNotEmpty({ message: '餐厅名称不能为空' })
  @Length(1, 50, { message: '餐厅名称长度不能超过50' })
  name: string;

  @ApiProperty({ description: '餐厅地址', maxLength: 255 })
  @IsNotEmpty({ message: '餐厅地址不能为空' })
  @Length(1, 255, { message: '餐厅地址长度不能超过255' })
  address: string;

  @ApiProperty({ description: '餐厅经度' })
  longitude: number;

  @ApiProperty({ description: '餐厅纬度' })
  latitude: number;

  @ApiProperty({ description: '餐厅图片', required: false })
  image?: string;

  @ApiProperty({ description: '餐厅公告', required: false })
  notice?: string;

  @ApiProperty({ description: '联系电话', required: false })
  phone?: string;

  @ApiProperty({ description: '起送价' })
  minPrice: number;

  @ApiProperty({ description: '配送费' })
  deliveryFee: number;
}
